//
//  UIView+Operation.h
//  PinZhe
//
//  Created by Sun on 2019/4/16.
//  Copyright © 2019 Sun. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(NSInteger, DXRadianDirection) {
    DXRadianDirectionBottom     = 0,
    DXRadianDirectionTop        = 1,
    DXRadianDirectionLeft       = 2,
    DXRadianDirectionRight      = 3,
};

@interface UIView (Operation)

/**
 添加渐变色
 
 @param frame 渐变色位置 一般为 button.bounds
 @param colors 渐变色数组
 @param locations locations description
 @param startPoint startPoint description
 @param endPoint endPoint description
 @param cornerRadius cornerRadius description
 */
- (void)gradientLayerWithFrame:(CGRect)frame
                        Colors:(NSArray <UIColor *>*)colors
                     locations:(NSArray <NSNumber *>*)locations
                    startPoint:(CGPoint)startPoint
                      endPoint:(CGPoint)endPoint
                  cornerRadius:(CGFloat)cornerRadius;

- (void)setBorderWithCornerRadius:(CGFloat)cornerRadius
                      borderWidth:(CGFloat)borderWidth
                      borderColor:(UIColor *)borderColor
                             type:(UIRectCorner)corners;

- (void)setRadianLayer:(DXRadianDirection)direction Radius:(CGFloat)radian;

@end

NS_ASSUME_NONNULL_END
